﻿@model IEnumerable<PlanificadorDeEventos.Models.Evento>



@{
    ViewBag.Title = "Index";
}

<h2>Listado de Eventos</h2>

<p>
    @Html.ActionLink("Nuevo", "Create")
    @Html.ActionLink("Mis eventos", "MisEventos")
</p>


<link href="../../Content/ui.jqgrid.css" rel="stylesheet" type="text/css" />
<link href="../../Content/cupertino/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css" />

<script src="../../Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="../../Scripts/grid.locale-sp.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.jqGrid.min.js" type="text/javascript"></script>



 @using (Html.BeginForm("Filtrar", "Evento", FormMethod.Post, null))
 {
  
    <input type="text" name="name" value="@ViewBag.Name" />

     <input type="submit" value="Buscar"/>

    <table class="bordered">
        <tr>
            <th style="padding-right:15px">
                @Html.DisplayNameFor(model => model.Nombre)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Description)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Date)
            </th>
            <th style="padding-left:15px">
                @Html.DisplayNameFor(model => model.EndRegistrationDate)
            </th>
            <th>
                @Html.DisplayName("Acción")
            </th>

        </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Nombre)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Description)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Date)
            </td>
            <td style="padding-left:15px">
                @Html.DisplayFor(modelItem => item.EndRegistrationDate)
            </td>
            <td>
                @Html.ActionLink("Detalle", "Details", new { id = item.ID }) 
            </td>
    
        </tr>
    }

    </table>
 }
